package com.dotflat.satistics.vo.general;

import lombok.Data;

/**
 * *******************************
 * Created by Tim.
 * form com.matt
 * on 2018/7/20
 * *******************************
 */
@Data
public class AllIncomeConstituteVo {
    private String areaName;
    private double nurseryAmount = 0.0;
    private double earlyAmount = 0.0;
    private double otherAmount = 0.0;

    public static AllIncomeConstituteVo of(Double nurseryAmount, Double earlyAmount, Double otherAmount, String areaName) {
        AllIncomeConstituteVo vo = new AllIncomeConstituteVo();
        vo.setNurseryAmount(nurseryAmount == null ? 0.0 : nurseryAmount);
        vo.setEarlyAmount(earlyAmount == null ? 0.0 : earlyAmount);
        vo.setOtherAmount(otherAmount == null ? 0.0 : otherAmount);
        vo.setAreaName(areaName);
        return vo;
    }
}
